﻿@model RenterClient.Models.LoginModel

@{
    ViewBag.Title = "Log in";
}

@*<hgroup class="title">
    <h1>@ViewBag.Title.</h1>
</hgroup>

<section id="loginForm">
<h2>Use a local account to log in.</h2>
@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Log in Form</legend>
        <ol>
            <li>
                @Html.LabelFor(m => m.UserName)
                @Html.TextBoxFor(m => m.UserName)
                @Html.ValidationMessageFor(m => m.UserName)
            </li>
            <li>
                @Html.LabelFor(m => m.Password)
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </li>
            <li>
                @Html.CheckBoxFor(m => m.RememberMe)
                @Html.LabelFor(m => m.RememberMe, new { @class = "checkbox" })
            </li>
        </ol>
        <input type="submit" value="Log in" />
    </fieldset>
    <p>
        @Html.ActionLink("Register", "Register") if you don't have an account.
    </p>
}
</section>

<section class="social" id="socialLoginForm">
    <h2>Use another service to log in.</h2>
    @Html.Action("ExternalLoginsList", new { ReturnUrl = ViewBag.ReturnUrl })
</section>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}*@




<div class="content-section-a">

    <div class="container">


        <h4 class="form-signin-heading" style="text-align: center; margin-top: 30px;">Please login</h4>

        <div class="row">
            <div class="col-lg-4 col-md-4 col-sm-4 col-lg-offset-4 col-md-offset-4 col-sm-offset-4">
                <div style="margin-top: 10px; margin-left: 30px;">
                    <a href="/oauth/facebook" class="popup" data-height="400" data-name="popupAuth" data-width="600">
                        <img alt="Facebook-connect" src="https://spinlister-belvedere-assets.spinlister.com/spinlister/facebook-connect-9536999b58b0c8013222fd855dcc4cd2.png" width="300"></a>
                </div>
            </div>
        </div>

        <h4 class="form-signin-heading" style="text-align: center; margin-top: 30px;">or</h4>

        <div class="row">
            <div class="col-lg-4 col-md-4 col-sm-4 col-lg-offset-4 col-md-offset-4 col-sm-offset-4">
                <div style="margin-top: 30px;">

                    <section id="loginForm">
                        @using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl }))
                        {
                            @Html.ValidationSummary(true)

                            <fieldset>
                                @Html.TextBoxFor(m => m.UserName, new { @class = "form-control", @type = "text", @name = "username", @placeholder = "Email Address", @required = "", @autofocus = "" })
                                @Html.PasswordFor(m => m.Password, new { @class = "form-control", @type = "password", @name = "password", @placeholder = "Password", @required = "" })

                                <label class="checkbox">
                                    @Html.CheckBoxFor(m => m.RememberMe)
                                    @Html.LabelFor(m => m.RememberMe, new { @value = "remember-me", @type = "checkbox", @id = "rememberMe", @name = "rememberMe" })

                                </label>
                                @if (Model != null && Model.IsBadLoginPassword == true)
                                {
                                    <p >Bad login/password!</p>
                                }
                                <input type="submit" value="Log in" class="btn btn-lg btn-primary btn-block" />
                            </fieldset>
                            <div style="text-align: center; margin-top: 10px;">
                                <p>
                                    @Html.ActionLink("Register", "Register", routeValues: null, htmlAttributes: new { id = "registerLink" }) if you don't have an account.
                                </p>
                                <a>Forgot your password?</a>
                            </div>
                        }
                    </section>
                </div>
            </div>
        </div>





    </div>
    <!-- /.container -->

</div>
<!-- /.content-section-a -->
